2020-2021 Sunseeker Telemetry and Lighting System
timer_a_ex4_pwmMultipleUpDown.c File Reference
#include "driverlib.h"

Go to the source code of this file.

Macros

#define TIMER_PERIOD   127
 
#define DUTY_CYCLE1   32
 
#define DUTY_CYCLE2   96
 

Functions

void main (void)
 

Macro Definition Documentation

◆ DUTY_CYCLE1

#define DUTY_CYCLE1   32

Definition at line 66 of file timer_a_ex4_pwmMultipleUpDown.c.

◆ DUTY_CYCLE2

#define DUTY_CYCLE2   96

Definition at line 67 of file timer_a_ex4_pwmMultipleUpDown.c.

◆ TIMER_PERIOD

#define TIMER_PERIOD   127

Timer_A3, PWM TA1.1-2, Up/Down Mode, DCO SMCLK

Description: This program generates two PWM outputs on P2.2,3 using Timer1_A configured for up/down mode. The value in CCR0, 128, defines the PWM period/2 and the values in CCR1 and CCR2 the PWM duty cycles. Using ~1.045MHz SMCLK as TACLK, the timer period is ~233us with a 75% duty cycle on P2.2 and 25% on P2.3. SMCLK = MCLK = TACLK = default DCO ~1.045MHz.

Tested On: MSP430FR5739

/ |
RST

| | | P1.2/TA1.1|--> CCR1 - 75% PWM | P1.3/TA1.2|--> CCR2 - 25% PWM

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

  • Timer peripheral
  • GPIO peripheral

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

  • NONE

Definition at line 65 of file timer_a_ex4_pwmMultipleUpDown.c.

Function Documentation

◆ main()

void main ( void  )